Skip to content

Feat: native ints in impure functions (N-13, #232) - #262

Merged
b-re-w merged 1 commit into
developfrom
feat/tp-native-int
Oct 24, 2026
Merged

b-re-w merged 1 commit into
developfrom
feat/tp-native-int

Conversation

@b-re-w

@b-re-w b-re-w commented Oct 24, 2026

Copy link
Copy Markdown
Member

Closes #232

New IR type INT (i64 promoted in place to a PyLong on overflow, no deopt after an effect), pre-boxed constants, cached global and builtin reads behind the dict-watcher epoch. The cache holds borrowed pointers (PyUnstable_EnableTryIncRef/TryIncRef + epoch recheck on 3.15t), so no object lives longer than in CPython (weakref and del lifetime tests).

Red: test_native_int_impure.py on the develop compiler 13 failed, 22 passed. Local 3.15t full suite: 1264 passed, 3 skipped.
Benchmark compiled set vs develop: wordfreq gains word_of and main; all others identical (nbody compiles nothing on both, #220).
Interleaved, 7 pairs, load 4.5 to 6 (not quiet): wordfreq 1.6x vs CPython (develop 1.1x); spectral-norm 48.7x, fannkuch 20.9x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant